home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 03 - 1987 / 03.03 Mar 87 / Basic Graf3D / MacTutor VW Demo < prev    next >
Encoding:
Text File  |  1987-02-10  |  1.3 KB  |  69 lines  |  [TEXT/MSBB]

  1. ' Professor Mac's Movie Demo
  2. ' ©MacTutor 1987
  3. ' By Dave Kelly
  4. ' Requires CLR VWLib (VideoWorks not required)
  5. ' with optional support for CLR SpeechLib
  6.  
  7. CLEAR, 30000!
  8. false=0:true=NOT false
  9. LIBRARY"XP™ 40-6:Software Dev:MS Basic:VWlib"
  10. ON ERROR GOTO 10
  11. SpeechStatus=true
  12. LIBRARY "XP™ 40-6:Software Dev:MS Basic:SpeechLib"
  13. ON ERROR GOTO 0
  14. IF SpeechStatus=true THEN
  15.     SpeechHand!=0!
  16.     SpeechErr%=0
  17.     Phon$=""
  18.     SpeechOn "",SpeechHand!,SpeechErr%
  19.     ReaderString SpeechHand!,"Hello",Phon$,SpeechErr%
  20. END IF
  21.  
  22. DIM A%(300)
  23. refnum%=0
  24. done%=0
  25. movie$="XP™ 40-6:Mar Issue:Basic Mar87:Professor Mac Movie"
  26. CLS
  27. ON ERROR GOTO 20
  28. vwopen movie$,0,0,refnum%
  29. ON ERROR GOTO 0
  30. ON TIMER (4) GOSUB Wait1
  31. TIMER ON
  32. advance:
  33.     vwanimate refnum%,done%
  34.     IF done%=0 THEN advance
  35. done:
  36. IF SpeechStatus=true THEN SpeechOff SpeechHand!
  37. vwclose refnum%
  38. INITCURSOR
  39.  
  40. END
  41. Wait1:
  42. TIMER OFF
  43. IF SpeechStatus=true THEN GOSUB Speak
  44. ON TIMER(13) GOSUB Wait2
  45. TIMER ON
  46. RETURN
  47. Wait2:
  48. IF SpeechStatus=true THEN GOSUB Speak
  49. TIMER OFF
  50. RETURN
  51.  
  52. Speak:
  53.  
  54. GET (15,15)-(85,55),A%
  55. SoundOutString SpeechHand!,Phon$,SpeechErr%
  56. PUT (15,15),A%,PSET
  57. HIDECURSOR
  58. ReaderString SpeechHand!,"Welcome to MacTutor",Phon$,SpeechErr%
  59. RETURN
  60.  
  61. 10 NoSpeech:
  62. IF ERR=53 THEN SpeechStatus=false
  63. RESUME NEXT
  64. 20 NoMovie:
  65. movie$=FILES$(1,"VWSCVWZP")
  66. IF movie$="" THEN END
  67. vwopen movie$,0,0,refnum%
  68. RESUME NEXT
  69.